package com.ysstech.system.service;


import java.util.List;

import com.baomidou.mybatisplus.extension.service.IService;
import com.ysstech.common.entity.PageBean;
import com.ysstech.common.entity.Role;
import com.ysstech.common.entity.TreeNode;
import com.ysstech.common.entity.User;

/**
 * <p>
 * 角色服务类
 * </p>
 *
 * @author lishuangliang
 * @since 2020-09-11
 */
public interface RoleService extends IService<Role> {
    /**
     * 查询角色列表信息
     *
     * @param role
     * @param pageBean
     * @return
     * @throws Exception
     */
    public PageBean<Role> queryAllRoles(Role role, PageBean pageBean) throws Exception;

    /**
     * 批量删除角色
     *
     * @param ids
     * @throws Exception
     */
    public void batchDeleteRole(List<String> ids) throws Exception;

    /**
     * 处理角色拥有的权限默认勾选
     *
     * @param roleId
     * @return
     * @throws Exception
     */
    public List<TreeNode> quertMenuByRoleId(String roleId) throws Exception;

    /**
     * 保存角色的权限信息
     *
     * @param roleId     角色id
     * @param listMenu   菜单权限集合
     * @param listRegion 按钮权限集合
     * @throws Exception
     */
    public void saveAuthByRoleId(String roleId, List<String> listMenu, List<String> listRegion) throws Exception;


    /**
     * 类型，机构等中文的转换
     *
     * @param list
     * @return
     * @throws Exception
     */
    public List<Role> switchedListRole(List<Role> list) throws Exception;

}

